package com.sch.www.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sch.www.entity.SysRoleMenu;
import com.sch.www.user.mapper.SysRoleMenuMapper;
import com.sch.www.user.service.ISysRoleMenuService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author admin
 * @since 2019-05-20
 */
@Service
public class SysRoleMenuServiceImpl extends ServiceImpl<SysRoleMenuMapper, SysRoleMenu> implements ISysRoleMenuService {


    @Override
    public List<SysRoleMenu> listByRoleId(String roleId) {
        QueryWrapper<SysRoleMenu> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("role_id",roleId);
        return  list(queryWrapper);
    }

    @Override
    public List<SysRoleMenu> listByRoleIds(List<String> roleIds) {
        QueryWrapper<SysRoleMenu> queryWrapper=new QueryWrapper<>();
        queryWrapper.in("role_id",roleIds);
        return  list(queryWrapper);
    }
}
